package io.renren.modules.sys.dao;

import io.renren.modules.sys.entity.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.*;

/**
 * 
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2019-03-19 15:58:27
 */
@Mapper
public interface ProductDao extends BaseMapper<ProductEntity> {
	List<ProductAnalysisEntity> getProductAnalysis(@Param("shelvesid")int shelvesid,@Param("productname")String productname, @Param("startime")String startime, @Param("endtime")String endtime);

	ProductAnalysisStatisticsEntity getStatistics(@Param("shelvesid")int shelvesid,@Param("productname")String productname, @Param("startime")String startime, @Param("endtime")String endtime);

	List<ProductEntity> getProductList(@Param("takeout")Integer takeout,
											  @Param("name")String name, @Param("categoryid")String categoryid,
											  @Param("currPage")int currPage, @Param("pageSize")int pageSize);

	int queryListcount(@Param("takeout")Integer takeout,@Param("name")String name,
					   @Param("categoryid")String categoryid);


	List<ProductEntity> getLowerProductList( @Param("name")String name, @Param("categoryid")String categoryid,@Param("shelvesid")int shelvesid,
									   @Param("currPage")int currPage, @Param("pageSize")int pageSize);

	int queryLowerListcount(@Param("name")String name,
					   @Param("categoryid")String categoryid,@Param("shelvesid")int shelvesid);

	ProductVOEntity getLowerProductInfo(@Param("shelvesid")int shelvesid,@Param("productid")int productid);
}
